package com.jack.lib.ui.init

import android.app.Application
import android.content.Context
import androidx.startup.Initializer
import java.util.*

/**
 * author : chong.huang
 * create : 2021/12/29
 * desc   :
 */
class AppInitializer : Initializer<Any> {
    override fun create(context: Context): Any {
        if (context is Application) {
            init(context)
        }
        return "null"
    }

    override fun dependencies(): MutableList<Class<out Initializer<*>>> {
        return Collections.emptyList()
    }

    private fun init(app: Application) {
        CameraInitializer.init(app)
    }
}